In many applications, computers and processors maintain some form of real time for reference and sequencing purposes, and for the purpose of synchronization of activities with other computers or processors. In particular, in network and multiprocessing architectures, such as that shown in FIG. 11, time synchronization between network nodes 100 is important. The common terminology is to say that a node maintains a "clock", and that "clock synchronization" is the process by which the nodes maintain the time values of their clocks.
Generally, such devices maintain a register or other hardware or software structure which contains a representation of real time. This time representation can be either a political time (such as Universal Time, Greenwich Mean Time, Eastern Standard Time, etc.) or some suitable form of logical time. In either case, the device maintaining the time representation updates the time internally on a real time basis. For instance, a processor might have a hardware oscillator which provides a signal at a known real time interval, measured in terms of system hardware clock cycles. Responsive to the signal, the processor updates its internal time in accordance with the known real time interval between signals.
In addition to maintaining and updating time internally, a processor or network node synchronizes its internal time with an external reference time source 102. A processor which has been synchronized to an external time source measures time in accordance with its internal hardware clock, which operates at a known frequency. Since the hardware clock frequency is inevitably not perfectly accurate, as time goes by the internal time maintained by a processor diverges from the external time with which the processor was previously synchronized. This time divergence is sometimes called "clock drift". Typically the processor's time drifts away from the external time as a linear function of elapsed time since synchronization. To prevent the clock drift from getting too large, from time to time the processor resynchronizes its internal time with the external reference time.
In general, a time is represented, not as a single time value, but rather as an interval, such as a time value, plus or minus an error bound value. A time expressed as an interval is considered to be "correct" if a reference time falls within that interval. For instance, if the time according to an external reference is 12:00:00, then a time representation of 11:59:50.+-.0:00:15, which runs from 11:59:35 to 12:00:05, would be considered correct.
Because of clock drift, a time representation must gradually increase the error bound in order to remain correct. Eventually, the error bound grows large enough to be disadvantageous or unsuitable for operation. Then, a resynchronization procedure is executed, and a new time is adopted. In particular, the resynchronization procedure produces a new, smaller error bound to go with the new time.
Various arrangements may be used for providing a reference time source. For instance, in a network comprising a plurality of nodes, one of the nodes serves as a repository of a reference time. All other nodes of the network are synchronized with that node's time. Another time synchronization method involves reception of a reference time from a time source external to the network. Time services exist, which provide accurate time information for various purposes, including computer or network synchronization. One well known time service is WWV, which broadcasts a Universal Time signal. WWV and other similar time sources may be used to provide time synchronization to computers and processors.
As described above, a processor which is synchronized with such a time source gradually drifts out of synchronization. Also, time sources such as WWV occasionally introduce "leap seconds" to synchronize their time with the motions of the planet Earth. To prevent error from accumulating due to drift and leap seconds, it is particularly desirable that a processor synchronize itself with an external time source from time to time in the normal course of its operation.
In architectures in which a predetermined node is a reference time source, or in which an external reference time source, such as a subscription time service, is coupled through a suitable communication link or interface 104 to a predetermined node of a network, the predetermined node may be characterized as a master node. In order for the master node to synchronize other nodes, the master node conventionally must know which other nodes it is responsible for updating, so that it can direct appropriate time update messages to those nodes. The master node sends synchronization messages to other nodes coupled to the network, which are slave nodes relative to the predetermined node.
In addition, to guarantee that the slave nodes are properly updated, the master node must receive responses from each of the slave nodes. In this scenario, a round trip scheme is employed between each slave node and the master node, in which a message is sent and then an acknowledgement is awaited. A round trip scheme is also employed if a slave node sends a synchronization request message to the master node, and the master node responds by sending a synchronization message. The inaccuracy of time provided to a slave node in these scenarios is directly related to the total elapsed time for the round trip sequence of messages. Thus, the precision with which clock synchronization can be achieved is limited by the time required for round trip synchronization.